﻿<%@LANGUAGE=VBSCRIPT%>
<%OPTION EXPLICIT%>
<%
dim strCapValue
dim dd,mm,yy,hh,mn,ss
hh = hour(now)
mn = minute(now)
ss = second(now)

strCapValue = rnd(clng(session.SessionID)) * clng(hh & mn & ss)
dim str 
str=""
dim dx
dx=1
while len(str)<6 and len(strCapValue)>0
    if dx>0 then
        str = str & hex(cint(right(strCapValue,3)))
        strCapValue = left(strCapValue,len(strCapValue)-3)
    else
        str = str & hex(cint(left(strCapValue,3)))
        strCapValue = right(strCapValue,len(strCapValue)-3)
    end if
    dx=dx*(-1)   
wend

if len(str)<6 then
    str = str & string(6-len(str),"z")
elseif len(str)>6 then
    str = left(str,6)
end if

response.write str %>